package com.jp.knowledge.view.maintab;

import android.content.Context;
import android.view.View;

import com.jp.knowledge.R;

/**
 * Created by 528787067@qq.com on 2017/7/20.
 */

public class MainTab3 extends MainTab1 {

	public MainTab3(Context context) {
		super(context);
	}

	@Override
	protected void init() {
		super.init();
		tabTitle.setText("发现");
	}

	@Override
	public void selectState() {
		tabIcon.setImageResource(R.mipmap.bottombar_discovery_blue);
		tabTitle.setTextColor(getContext().getResources().getColor(R.color.theme_color));
	}

	@Override
	public void unselectState() {
		tabIcon.setImageResource(R.mipmap.bottombar_discovery);
		tabTitle.setTextColor(getContext().getResources().getColor(R.color.font_gray_deep));
	}

	public void setMessageCount(int count){
		if(count > 0){
			tabRemindCount.setVisibility(View.VISIBLE);
			tabRemindCount.setText(count + "");
		} else if(count == 0){
			tabRemindCount.setVisibility(View.GONE);
		}
	}
}
